package ioc

import (
	"github.com/spf13/viper"
	"gquickstarter/pkg/cache"
)

func CacheInitialization(viper *viper.Viper) cache.ECache {
	cacheType := viper.GetString("cache.type")
	switch cacheType {
	case "redis":
		return cache.CreateCache(viper)
	}
	return nil
}
